﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Nsf.Samples.RetryActivitySample.Infrastructure.ClientBase;
using Nsf.Samples.RetryActivitySample.Infrastructure.Common.Commands;
using Nsf.Samples.RetryActivitySample.ServiceContract;

namespace Nsf.Samples.RetryActivitySample.Client
{
    public class WorkflowManagerClient : SafeClientBase<IWorkflowManager>, IWorkflowManager
    {
        #region IWorkflowManager Members

        public Guid StartWorkflow(string workflowType)
        {
            return Channel.StartWorkflow(workflowType);
        }

        public RetryableWorkflowInfo GetRetryableWorkflow(Guid workflowInstanceId)
        {
            return Channel.GetRetryableWorkflow(workflowInstanceId);
        }

        public List<RetryableWorkflowInfo> GetRetryableWorkflows(string workflowType)
        {
            return Channel.GetRetryableWorkflows(workflowType);
        }

        public void RetryActivity(RetryableActivityInfo retryableActivityInfo)
        {
            Channel.RetryActivity(retryableActivityInfo);
        }

        public void RetryWorkflow(RetryableWorkflowInfo retryableWorkflowInfo)
        {
            Channel.RetryWorkflow(retryableWorkflowInfo);
        }

        public void SendCommandToWorkflow(Guid workflowInstanceId, CommandData commandData)
        {
            Channel.SendCommandToWorkflow(workflowInstanceId, commandData);
        }

        #endregion
    }
}
